package com.example.consumer.feign;

import com.example.common.dto.UserDTO;
import com.example.consumer.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "user-service", configuration = FeignConfig.class)
public interface UserClient {

    @GetMapping("/users/{id}")
    UserDTO getUser(@PathVariable("id") Long id);

    @GetMapping("/users")
    List<UserDTO> getAllUsers();

    @PostMapping("/users")
    UserDTO createUser(@RequestBody UserDTO user);
} 